package com.install.core.util;
import java.util.ArrayList;
import java.util.List;
public class SimpleTreeNode {
	

		 private String id="";
		 private String pid="";
		 private String pname;
		 private List children;
		 private String text;
		 public  boolean isLeaf;
		 public SimpleTreeNode(String id,String pid, boolean isLeaf,String text){
			 this.id=id;
			 this.pid=pid;
			 this.isLeaf=isLeaf;
			 this.text=text;
		 }  
		 public SimpleTreeNode(){
			 
		 }
		  public String getId() {
			return id;
		}

		public boolean isLeaf() {
			return isLeaf;
		}

		public void setLeaf(boolean isLeaf) {
			this.isLeaf = isLeaf;
		}

		public void setId(String id) {
			this.id = id;
		}

		public String getPid() {
			return pid;
		}

		public void setPid(String pid) {
			this.pid = pid;
		}

		public List getChildren() {
			return children;
		}

		public void setChildren(List children) {
			this.children = children;
		}

		public boolean isChildren(SimpleTreeNode p) {
			return getPid().equals(p.getId());
		}

		public void addChildren(SimpleTreeNode vo) {
			if (this.children == null)
				this.children = new ArrayList();
				this.children.add(vo);
		}
		public String getText() {
			return text;
		}
		public void setText(String text) {
			this.text = text;
		}
		public String getPname() {
			return pname;
		}
		public void setPname(String pname) {
			this.pname = pname;
		}
}
